****
** Replication File:
**
** The Relationship between Social Media Use and 
** Beliefs in Conspiracy Theories and Misinformation
**
** 2020 Florida data
****

set more off

* Set working directory

* Open October 2020 data
use "Clean Data, Florida 2020.dta"

********************************************************************************

****
** Table A14
****

sum age
sum female
sum black
sum hispanic
sum pid
sum ideo 

********************************************************************************

****
** Table A15 and estimates for Figure A4
** (stored in "Marginal Effects, Florida.csv")
****

reg number socmedia conthink pid ideo edu interest age ///
	income female black hispanic	
est sto mod1
	
reg number socialmedia socmedia conthink pid ideo interest edu age ///
	income female black hispanic		
est sto mod2
	
reg number c.socialmedia##c.conthink c.socmedia##c.conthink pid ///
	ideo edu interest age income female black hispanic	
est sto mod3
margins, dydx(socialmedia) at(conthink=(1(.5)5))

* Save model estimates
esttab mod1 mod2 mod3 using "Number Estimates, June.rtf", ///
	cells(b(star fmt(3)) se(par fmt(3))) legend label ///
	varlabels(_cons Constant) stats(r2 N, fmt(3 0 1)) ///
	addnotes(Note: OLS coefficients with standard errors in parentheses)

****
** Table A16 and estimates for Figure A4
** (stored in "Marginal Effects, Florida.csv")
****

reg misnumber socmedia conthink pid ideo interest edu age ///
	income female black hispanic	
est sto mod4	

reg misnumber socialmedia socmedia conthink pid ideo interest edu age ///
	income female black hispanic	
est sto mod5
	
reg misnumber c.socialmedia##c.conthink c.socmedia##c.conthink pid ///
	ideo  interest edu age income female black hispanic	
est sto mod6
margins, dydx(socialmedia) at(conthink=(1(.5)5))

* Save model estimates
esttab mod4 mod5 mod6 using "Misinformation Estimates, June.rtf", ///
	cells(b(star fmt(3)) se(par fmt(3))) legend label ///
	varlabels(_cons Constant) stats(r2 N, fmt(3 0 1)) ///
	addnotes(Note: OLS coefficients with standard errors in parentheses)

****
** Table A17 and estimates for Figure A4
** (stored in "Marginal Effects, Florida.csv")
****

reg qanonft socmedia conthink pid ideo interest edu age ///
	income female black hispanic	
est sto mod7	

reg qanonft socialmedia socmedia conthink pid ideo interest edu age ///
	income female black hispanic	
est sto mod8	
	
reg qanonft c.socialmedia##c.conthink c.socmedia##c.conthink pid ///
	ideo interest edu age income female black hispanic	
est sto mod9	
margins, dydx(socialmedia) at(conthink=(1(.5)5))

* Save model estimates
esttab mod7 mod8 mod9 using "QAnon Estimates, June.rtf", ///
	cells(b(star fmt(3)) se(par fmt(3))) legend label ///
	varlabels(_cons Constant) stats(r2 N, fmt(3 0 1)) ///
	addnotes(Note: OLS coefficients with standard errors in parentheses)

clear

	
